#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

// 将 26 进制字符串转为十进制整数
int toDecimal(string& s) {
    int res = 0;
    for (char ch : s) {
        res = res * 26 + (ch - 'a');
    }
    return res;
}


//将十进制整数转为 26 进制字符串
string toBase26(int num, int maxLen = 10) {
    if (num == 0) return "a";
    string res;
    while (num > 0) {
        int digit = num % 26;
        res.push_back('a' + digit);
        num /= 26;
    }

    reverse(res.begin(), res.end());
    return res;
}

int main(){
	int T;
	cin>>T;
	while(T--){
	string x,y;
	cin>>x>>y;
    int numX = toDecimal(x);
    int numY = toDecimal(y);
    int sum = numX + numY;
    cout << toBase26(sum) << endl;
    
 	}
	return 0;
}